﻿@using Abp.Authorization.Users
@using LyyCMS.Web.Models.Common.Modals
@using LyyCMS.Web.Models.Members
@model MemberListViewModel
@{ Layout = null; }

<div class="modal fade" id="UserCreateModal" tabindex="-1" role="dialog" aria-labelledby="UserCreateModalLabel" data-backdrop="static">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            @await Html.PartialAsync("~/Views/Shared/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(L("CreateNewMember")))
            <form name="userCreateForm" role="form" class="form-horizontal" enctype="multipart/form-data">
                <div class="modal-body">
                    <ul class="nav nav-tabs" role="tablist">
                        <li class="nav-item">
                            <a class="nav-link active" data-toggle="tab" role="tab" href="#create-user-details">@L("MemberDetails")</a>
                        </li>
                        <li class="nav-item" style="display:none;">
                            <a class="nav-link" data-toggle="tab" role="tab" href="#create-user-roles">@L("Category")</a>
                        </li>
                    </ul>
                    <div class="tab-content mt-4">
                        <div role="tabpanel" class="tab-pane container active" id="create-user-details">
                            <div class="form-group row required">
                                <label class="col-md-3 col-form-label">@L("Name")</label>
                                <div class="col-md-9">
                                    <input type="text" class="form-control" name="Name" required maxlength="@AbpUserBase.MaxUserNameLength" minlength="2">
                                </div>
                            </div>
                            <div class="form-group row required">
                                <label class="col-md-3 col-form-label">@L("LoginName")</label>
                                <div class="col-md-9">
                                    <input type="text" class="form-control" name="LoginName" required maxlength="@AbpUserBase.MaxNameLength">
                                </div>
                            </div>

                            <div class="form-group row required">
                                <label class="col-md-3 col-form-label">@L("EmailAddress")</label>
                                <div class="col-md-9">
                                    <input type="email" class="form-control" name="EmailAddress" required maxlength="@AbpUserBase.MaxEmailAddressLength">
                                </div>
                            </div>

                            <div class="form-group row">
                                <label class="col-md-3 col-form-label">@L("PhoneNumber")</label>
                                <div class="col-md-9">
                                    <input type="text" class="form-control" name="PhoneNumber" maxlength="@AbpUserBase.MaxPhoneNumberLength">
                                </div>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-md-3 col-form-label" for="CreateUserIsActive">@L("Category")</label>
                            <div class="col-md-9">
                                <select id="categoryId" name="categoryId" class="form-control">
                                    @foreach (var cate in Model.Categories)
                                    {
                        <option value="@cate.Id">@cate.Name </option>
}
                                </select>

                            </div>
                        </div>

                    </div>
                </div>
                @await Html.PartialAsync("~/Views/Shared/Modals/_ModalFooterWithSaveAndCancel.cshtml")
            </form>
        </div>
    </div>
</div>
